home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
mail
/
thor201.lha
/
THOR_2.0
/
InstallThor
< prev
next >
Wrap
Text File
|
1995-05-15
|
15KB
|
608 lines
;*************************************************************************
; Title:
; InstallThor
;*************************************************************************
; Description:
; Commodore Installer Script for the Thor 2.0 software
;*************************************************************************
; Author:
; Øyvind Ellefsen - versions for THOR upto 1.22
; Petter Nilsen - versions for 1.25 ->
;*************************************************************************
; Still to do:
; - Show .readme file
; - Warn against MultiUser
;
;*************************************************************************
;
;******************************************************
;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
;******************************************************
; some useful variables
(set true 1)
(set false 0)
(set yes true)
(set no false)
(set is_a_file 1)
(set is_a_dir 2)
(set quote "\"")
(set newline "\n")
(set nothing "")
; set up our delete options
(delopts "AskUser" "OkNoDelete" "Force")
; some useful procedures
; change userlevel to expert
(procedure expert_level
(
(user 2)
)
)
; reset userlevel back to default
(procedure default_level
(
(user default-level)
)
)
; store off userlevel
(procedure save_default_level
(
(set default-level @user-level)
)
)
; some overused strings
(set omp (cat "One moment please..." newline))
; introduce ourselfs to the viewers
(welcome "Welcome to the Thor installer. This installer uses "
"the Commodore Amiga Installer. All of our future Thor releases "
"will be using this installer and we would like to get any feedback "
"that might help to improve the installation procedure." newline
)
; first reset the user level so that the novice can see whats going on
(save_default_level)
(expert_level)
;Make assign to install from
(makeassign "Thor_Install" "" (safe))
;******************
;** Check Memory **
;******************
(run "Avail flush")
(set Running (run "Thor_Install:CheckForLib"))
(while (= Running 20)
(
(Message newline "Thor seem to be running, you MUST close it NOW."
newline "If you don't, the installation will fail!")
(run "Avail flush")
(set Running (run "Thor_Install:CheckForLib"))
)
)
;************************
;** Start Installation **
;************************
(if (exists "Thor:libs/bbsread.library" (noreq))
; Then
((set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
(abort end_text))
)
(if (exists "BBSData:global.config" (noreq))
; Then
((set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
(abort end_text))
)
(if (exists "envarc:THOR/BBSDataPath" (noreq))
; Then
((set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
(abort end_text))
)
(if (exists "envarc:THOR/ThorPath" (noreq))
; Then
((set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
(abort end_text))
)
(set Thor_Dir
(askdir
(prompt "Where would you like Thor installed?"
newline "The installer will NOT create a directory!")
(help @askdir-help)
(default "Work:")
(newpath)
)
)
(set Thor_Dir (expandpath Thor_Dir))
; before we go on lets reset the user's level back to what it was
(default_level)
; verify that the Thor directory exists
(if (<> (exists Thor_Dir) is_a_dir)
(
(makedir Thor_Dir
(prompt
"The directory you have selected for Thor does not "
"seem to exist. Do you want us to create it for you?"
)
(help @makedir-help)
(infos)
(confirm)
)
)
)
; Create directories for the THOR installation
(makeassign "Thor" Thor_dir)
(makedir "Thor:Data")
(makeassign "BBSData" "Thor:data")
;***********************************
;***** GET FIRST DISK IN HERE ******
;***********************************
; first copy over the stuff
(working omp "Decompressing and copying Thor files.")
(run "Thor_Install:lhex -a -f -w=THOR: x Thor_Install:thor.lha" )
;************************
;** Copy the keyfile **
;************************
(if (exists "Thor_Install:THOR.key" (noreq))
; Then
(copyfiles
(source "Thor_Install:THOR.key")
(dest "THOR:")
(nogauge)
)
)
;*****************************************
;** Copy the default arexx macro file **
;*****************************************
(if (exists "Thor_Install:THOR.macros" (noreq))
; Then
(copyfiles
(source "Thor_Install:THOR.macros")
(dest "THOR:")
(nogauge)
)
)
(default_level)
;***********************************
; Create the environment variables *
;***********************************
(set Running (run "Thor:bin/basemanager convert"))
(if (<> 0 Running)
(
((set end_text "Basemanager failed in setting up the env-variables.")
(abort end_text)))
)
;**************************************
;* Install the bbsread database stuff *
;**************************************
(run "thor:bin/initarc")
(run "thor:bin/InitCharsets")
(execute "thor:s/cfgqwk")
(execute "thor:s/cfgfido")
(execute "thor:s/cfgblue")
(execute "thor:s/cfguqwk_soup")
(execute "thor:s/cfguucp")
(execute "thor:s/cfgsoup")
(execute "thor:s/cfgabbs")
(execute "thor:s/cfgabbs_qwk")
(execute "thor:s/cfgmbbs")
(execute "thor:s/cfgbbbs")
(execute "thor:s/cfghippo")
(execute "thor:s/cfgomen")
;******************
;** Locale stuff **
;******************
(default_level)
(set catalog
(askoptions
(prompt "What languages would you like to install ?\n"
"English is the built-in language.")
(help
"This will install locale files for other languages than English. "
"You can set the prefered language on Workbench and in Thor by"
"using the prefs:locale tool." newline @askchoice-help
)
(choices "Norsk")
(default 0)
)
)
(if (<> 0 catalog)
(makedir "thor:catalogs")
)
(if (bitand 1 catalog)
(copyfiles
(source "Thor_Install:catalogs/norsk")
(dest "thor:catalogs/norsk")
(all)
)
)
;*********************
;** reqtools.libary **
;*********************
(copylib
(prompt "Copying ReqTools library")
(help "This will copy the ReqTools library." newline @copylib-help)
(source "Thor_Install:reqtools.library")
(dest "libs:")
)
;***********
;** Fonts **
;***********
(copyfiles
(prompt "Choose the fonts to install with Thor" newline "These are not required for Thor to run" )
(help "This will copy the default font files for Thor." newline @copyfiles-help)
(source "Thor_Install:Fonts")
(dest "Fonts:")
(fonts)
(choices "Grn" "Thin609" "Thin611" "Thin711")
(confirm)
)
;****************
;** AmigaGuide **
;****************
(if (askbool
(prompt newline "Do you want the AmigaGuide" newline "program and library installed?"
newline newline "If you have a newer version of the library" newline
"on your system, it will NOT be overwritten")
(help newline "The AmigaGuide library is needed for the Thor documentation"
newline "and the online help system in Thor."
newline newline "Select YES if you want it installed, otherwise NO")
(default 1)
)
; Then
(
(copyfiles
(prompt "Copying AmigaGuide program file")
(help "This will copy the files needed by AmigaGuide." newline @copyfiles-help)
(source "Thor_Install:AmigaGuide")
(dest "sys:Utilities")
)
(copylib
(prompt "Copying AmigaGuide library")
(help "This will copy the AmigaGuide library." newline @copylib-help)
(source "Thor_Install:amigaguide.library")
(dest "libs:")
)
)
)
;*****************************
;* Simple configuration here *
;*****************************
(if (askbool
(
(prompt newline "The following section in this installation "
"is used for setting up a download and an upload "
"directory for message packets. This section is "
"optional, but the directories needs to be "
"set in THOR if you do not set them up here.\n\n"
"Do you want to proceed with this?")
(help newline "This section of the installation is dedicated "
"to some first-time parameters that THOR "
"needs to have configured.\n\n"
"Select YES if you want to continue with this "
"configuration, otherwise NO")
(default 1)
)
)
; Then
(
(set DL_Dir
(askdir
(prompt "Where do you keep your downloaded message packets?\n\n"
"This is usually the download directory "
"configured in the communication program you "
"use."
(help @askdir-help)
(default "Work:")
(newpath)
)
)
)
(set DL_Dir (expandpath DL_Dir))
; verify that the download directory exists
(if (<> (exists DL_Dir) is_a_dir)
(
(makedir DL_Dir
(prompt
"The directory you have selected for downloaded "
"message packets does not seem to exist.\n\n"
"Do you want it to be created for you?")
(help @makedir-help)
(infos)
(confirm)
)
)
)
(if (= (exists DL_Dir) is_a_dir)
(
(set dlstr (cat dlstr "sys:rexxc/rx THOR:rexx/cfgglobal.br DNL " quote DL_Dir quote))
(run dlstr)
(run dlstr)
)
)
(set UL_Dir
(askdir
(prompt "Where would you like to keep any reply "
"message packets that THOR generates?\n\n"
"This is usually the upload directory "
"configured in your communication program."
(help @askdir-help)
(default "Work:")
(newpath)
)
)
)
(set UL_Dir (expandpath UL_Dir))
; verify that the download directory exists
(if (<> (exists UL_Dir) is_a_dir)
(
(makedir UL_Dir
(prompt
"The directory you have selected for upload of "
"reply packets does not seem to exist.\n\n"
"Do you want it to be created for you?")
(help @makedir-help)
(infos)
(confirm)
)
)
)
(if (= (exists UL_Dir) is_a_dir)
(
(set ulstr (cat ulstr "sys:rexxc/rx THOR:rexx/cfgglobal.br UPL " quote UL_Dir quote))
(run ulstr)
)
)
; Optionally configure a BBS.
(if (askbool
(
(prompt newline "The following section in this installation "
"is used for setting up a System (BBS or "
"Internet provider.) "
"This can also be done later, in the Systems "
"Configuration in THOR.\n\n"
"Select YES to configure a System for use or NO "
"if you like to do this after the installation.")
(help newline "This section of the installation is dedicated "
"to some first-time parameters that THOR "
"needs to have configured.\n\n"
"Select YES if you want to continue with this "
"configuration, otherwise NO")
(default 1)
)
)
; Then
(
(set bbs_type
(askchoice
(prompt "What type should this system be configured as?")
(help
"This option is for selecting which type of system this is. "
"By setting a system type here, THOR knows what parser and "
"packer to use on the message packets on this system.\n" @askchoice-help
)
(choices "QWK - Normal QWK"
"Fido - Normal Fidonet"
"BlueWave - Normal BlueWave"
"SOUP - Normal SOUP"
"UQWK_SOUP - SOUP with uqwk"
"UUCP - Normal UUCP"
"ABBS - Normal ABBS"
"ABBS_QWK - ABBS with QWK support"
"MBBS - Normal MBBS"
"Hippo - Normal Hippo V2"
"BBBS - Hippo on BBBS"
"Omen - Normal Omen"
)
(default 0)
)
)
(if (= bbs_type 0)
(set bbs_type "QWK")
)
(if (= bbs_type 1)
(set bbs_type "Fido")
)
(if (= bbs_type 2)
(set bbs_type "BlueWave")
)
(if (= bbs_type 3)
(set bbs_type "SOUP")
)
(if (= bbs_type 4)
(set bbs_type "UQWK_SOUP")
)
(if (= bbs_type 5)
(set bbs_type "UUCP")
)
(if (= bbs_type 6)
(set bbs_type "ABBS")
)
(if (= bbs_type 7)
(set bbs_type "ABBS_QWK")
)
(if (= bbs_type 8)
(set bbs_type "MBBS")
)
(if (= bbs_type 9)
(set bbs_type "Hippo")
)
(if (= bbs_type 10)
(set bbs_type "BBBS")
)
(if (= bbs_type 11)
(set bbs_type "Omen")
)
(set BBS_Name
(askstring
(prompt "Please enter a name to use for the "
"System in THOR (e.g. 'Ultima Thule BBS')."
(help @askstring-help)
)
)
)
(set Grab_Name
(askstring
(prompt "Please enter the name of message packets "
"from this System. Do not enter any "
"file extension, like .qwk or .lha. "
"(On UUCP systems, this should be the name "
"of your incoming mailbox.)")
(help newline "If message packets are named e.g. 'thule134.qwk', "
"just enter 'thule' here.\n"
)
)
)
(set str (cat str "sys:rexxc/rx THOR:rexx/cfgbbs.br " quote BBS_Name quote " GRAB " quote Grab_Name quote " TYPE " quote bbs_type quote))
(run str)
)
)
)
)
;*****************************
;****** Install icons ********
;*****************************
(if (askbool
(prompt newline "Do you want to install MagicWB " newline
"versions of the program and drawer icons?" newline)
(help newline "If you are using MagicWB on your Workbench, "
newline "you might want to install the special MagicWB icons."
newline newline "Select YES if you want it installed, otherwise NO")
(default 1)
)
; Then
(
(copyfiles
(prompt "Copying MagicWB icon files")
(source "Thor_Install:MWBIcons")
(dest "Thor:")
(pattern "~(THOR.guide.info)")
(nogauge)
)
(copyfiles
(prompt "Copying MagicWB icon files")
(source "Thor_Install:MWBIcons/THOR.guide.info")
(dest "Thor:Docs")
(newname "THOR.guide.info")
(nogauge)
)
(copyfiles
(prompt "Copying MagicWB icon files")
(source "Thor_Install:MWBIcons/THOR.guide.info")
(dest "Thor:Docs")
(newname "ConfigTHOR.guide.info")
(nogauge)
)
(copyfiles
(prompt "Copying MagicWB icon files")
(source "Thor_Install:MWBIcons/THOR.guide.info")
(dest "Thor:Docs")
(newname "ARexx.guide.info")
(nogauge)
)
(copyfiles
(prompt "Copying MagicWB icon files")
(source "Thor_Install:MWBIcons/THOR.guide.info")
(dest "Thor:Docs")
(newname "BBSReadRexx.guide.info")
(nogauge)
)
(copyfiles
(prompt "Copying MagicWB icon files")
(source "Thor_Install:MWBIcons/THOR.guide.info")
(dest "Thor:Docs")
(newname "THOR_Rexx.guide.info")
(nogauge)
)
(copyfiles
(prompt "Copying MagicWB icon files")
(source "Thor_Install:MWBIcons/THOR.guide.info")
(dest "Thor:Docs")
(newname "Installation.guide.info")
(nogauge)
)
)
)
(if (exists "env:sys/def_drawer.info" (noreq))
(copyfiles
(prompt "Copying default drawer icon")
(help "This will copy the default drawer icon." newline @copyfiles-help)
(source "env:sys/def_drawer.info")
(dest "Thor:")
(newname "Docs.info")
(infos)
)
)
;*****************************
;***** WE ARE ALMOST DONE ****
;*****************************
; make sure that default-dir is pointing to the right place
(set @default-dest Thor_Dir)
(makeassign "Thor_Install")
;(makeassign "Thor")
(makeassign "BBSData")
(makeassign "Thor_Disk" (safe))
; final message for our viewers
(set end_text (cat "Hope you like THOR! Don't hesitate to "
"send us comments, bugreports and suggestions."))
; now for the exit
(exit end_text)